package com.yuandian.business.monitor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuandian.api.business_monitor.po.AlarmParams;
import com.yuandian.api.business_monitor.po.AlarmReverseAnalysisParams;
import com.yuandian.api.business_monitor.po.QueryBusinessStepParams;
import com.yuandian.api.business_monitor.vo.AlarmBusinessStepVo;
import com.yuandian.api.business_monitor.vo.BaseBusinessAlarmVo;
import com.yuandian.api.business_monitor.vo.BusiDetailStatAlarmVo;
import com.yuandian.api.business_monitor.vo.BusinessStepVo;
import com.yuandian.bpm.common.core.util.R;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 详单分钟/小时统计表 服务类
 * </p>
 *
 * @author fucx
 * @since 2020-11-10
 */
public interface IBusiDetailStatService  {

	/**
     * 查询高级告警信息
     * @param params 告警参数
     * @return 返回分页对象
     */
	R getBusinessAlarm(AlarmParams params);

	/**
	 * 告警业务查询下载
	 * @param params
	 * @param response
	 */
	void exportExcel(AlarmParams params,HttpServletResponse response) throws IOException;



	/**
	 * 查询业务告警信息
	 * @param params 告警参数
	 * @return 返回分页对象
	 */
	public R getBusinessList(AlarmParams params);

	/**
	 * 查询业务告警信息
	 * @param params 告警参数
	 * @return 返回分页对象
	 */
	public R getBusinessListForStepExport(QueryBusinessStepParams params);


	/**
	 * 根据id查询告警详情
	 * @param id
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	BaseBusinessAlarmVo getBusinessAlarmDetail(String id, String startTime, String endTime);

	/**
	 * 根据步骤id查询business_detail
	 * @param id
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	R getBusinessDetailList(String id,String startTime,String endTime);

	/**
	 * 根据步骤id查询business_step
	 * @param id
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<AlarmBusinessStepVo> getStepDetailList(String id, String startTime, String endTime);

	/**
	 * 告警反推分析
	 * @param params 告警反推分析请求参数
	 * @return 通用返回对象
	 */
	Map<String, Object> reverseAnalysis(AlarmReverseAnalysisParams params) throws Exception;
}
